package com.gx.smart.construction.ui.house.db;

import androidx.paging.DataSource;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import com.gx.smart.construction.ui.house.model.RoomInfo;

import java.util.List;

/**
 * @author: xiaosy
 * 时间: 2022/2/11
 * @Description: room_info表的操作
 * @Version: 1.0
 **/
@Dao
public interface RoomInfoDao {

    @Query("SELECT * FROM room_info")
    DataSource.Factory<Integer, RoomInfo> listRoomInfo();

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insertRoomInfoList(List<RoomInfo> roomInfoList);

    @Query("DELETE FROM room_info")
    void clearRoomInfo();
}
